# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
#
# This PKGBUILD was extracted from AUR and adapted to our style
#
# Maintainer: John K. Luebs <jkluebs@luebsphoto.com>

pkgname=xiccd
pkgver=0.3.0
pkgrel=1
pkgdesc='Simple bridge between colord and X.'
arch=('x86_64' 'aarch64')
url='https://github.com/agalakhov/xiccd'
license=('GPL3')
depends=('colord' 'libxrandr')
source=("https://github.com/agalakhov/$pkgname/archive/v$pkgver.tar.gz")
sha512sums=('d507d91ba1a6d702c0ca63d1583e0ba330210e8c143ec72b866fd042ed9b8987820fb793fa8100077d59f4c01bc068eff68b8377ed4156956ad44c07f448a45f')

prepare() {
  cd "$pkgname-$pkgver"

  aclocal
  autoconf
  automake --add-missing --foreign --force --copy
  ./configure --prefix=/usr --sysconfdir=/etc
}

build() {
  cd "$pkgname-$pkgver"

  make
}

package() {
  cd "$pkgname-$pkgver"

  make DESTDIR="$pkgdir" install

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README ChangeLog NEWS \
    AUTHORS INSTALL
  install -Dm 644 COPYING "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

